﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace HelloXNA3.Components._3D.Polygon.Position
{
    public class EightPolygonPosition
    {
        public const float scale = 2.5f;

        public static Vector3[] Corners = new Vector3[]
        {
            new Vector3( 0, (float)(Math.Sqrt(2) / 2) * scale, 0),
            new Vector3(-0.5f * scale, 0, 0.5f * scale),
            new Vector3( 0.5f * scale, 0, 0.5f * scale),
            new Vector3( 0.5f * scale, 0, -0.5f * scale),
            new Vector3(-0.5f * scale, 0, -0.5f * scale),
            new Vector3( 0, (-1)* (float)(Math.Sqrt(2)/2)*scale, 0),
        };

        // 概率为 C(4,3) 我们会产生4个面
        public static int[][] Faces = new int[][]
        {
            new int[] { 0, 1, 2},
            new int[] { 0, 2, 3 },
            new int[] { 0, 3, 4},
            new int[] { 0, 4, 1},
            new int[] { 1, 4, 5},
            new int[] { 1, 5, 2},
            new int[] { 2, 5, 3},
            new int[] { 3, 5, 4},
        };
    }
}
